feat: update authz descriptions + add BlueprintMembershipType for dynamic entity types#983
Merged
pyramation merged 2 commits intomainfrom Apr 16, 2026
Merged
Conversation
…roup → 3+=dynamic entity types)
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two changes to the node type registry to support dynamic entity types:
1. Authz description updates — Updates the
membership_typeparameter description across all 5 authz node type definitions from"3=group"to"3+=dynamic entity types". This reflects that membership types ≥3 are no longer hardcoded as "group" — they are now dynamically registered entity types (data rooms, channels, departments, etc.) provisioned viamembership_types_module.2. New
BlueprintMembershipTypeinterface — Adds the TypeScript type for themembership_types[]array inBlueprintDefinition, matching the JSONB shape thatconstruct_blueprint()Phase 0 reads fromentity_type_provision. This was missing — the SQL procedure already supported it but the TS types didn't expose it.Files changed (source):
authz-membership-check.ts— description updateauthz-entity-membership.ts— description updateauthz-peer-ownership.ts— description updateauthz-related-entity-membership.ts— description updateauthz-related-peer-ownership.ts— description updatecodegen/generate-types.ts— newbuildBlueprintMembershipType()function + wired intobuildBlueprintDefinition()andbuildProgram()Regenerated:
blueprint-types.generated.tsviapnpm generate:typesCompanion to constructive-db PR #813 which renames
create_group/admin_group/create_organizations→create_entity/admin_entityin the SQL generators and test files.Review & Testing Checklist for Human
BlueprintMembershipTypefields match the SQL — compare the interface fields against theINSERT INTO entity_type_provisioninconstruct_blueprint()(procedure.sql). Any mismatch means blueprints built with this type would produce invalid JSONB.cd graphql/node-type-registry && pnpm generate:typeslocally and confirm the output matchesblueprint-types.generated.tsexactly (no manual edits crept in).3=group— confirm no other files in the repo still reference the old description.Notes
BlueprintMembershipTypeis a static type definition (not introspection-driven) sinceentity_type_provisionis a provisioning table, not a regular _meta-exposed table.node_type_registryseed SQL inconstructive-dbshould be regenerated so the deployed DB seed reflects the updated descriptions and new type.Link to Devin session: https://app.devin.ai/sessions/61be2d8e471048e294178e4a95d7e9dc
Requested by: @pyramation